<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width:200px;
            height: 200px;
            background: rgb(230, 185, 185);
        }
        .box2{
            width:200px;
            height: 200px;
            background: rgb(64, 233, 163);
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- <div v-bind:class="a"></div>
        <button v-on:click="b=!b">改变类</button>
        <div v-bind:class="b?'box':'box2'"></div>
        <div v-bind:aaaa="a"></div> -->
        <div :class="a"></div>
        <button v-on:click="b=!b">改变类</button>
        <div :class="b?'box':'box2'"></div>
        <div :aaaa="a"></div>
        <div :ccc=" 'nihao' "></div>
    </div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{
                a:"box2",
                b:true
            }
           
        })

      
    </script>
</body>
</html>